package com.lanou3g.k12.web.controller;


import com.lanou3g.k12.entity.ArticleContent;
import com.lanou3g.k12.service.ArticleContentService;
import com.lanou3g.k12.utils.K12Result;
import com.lanou3g.k12.utils.K12ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ArticleContentController {

    @Autowired
    ArticleContentService articleContentService;

    public K12Result findArticleContentById(Long id){

       ArticleContent articleContent = articleContentService.findArticleContentById(id);

       return K12ResultUtils.ok(articleContent);

    }

    public K12Result deleteArticleContentById(Long id){

        ArticleContent articleContent = articleContentService.deleteArticleContentById(id);

        return K12ResultUtils.ok();

    }

}
